{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 54,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(6820, 22)\n"
     ]
    }
   ],
   "source": [
    "import os\n",
    "import pandas as pd\n",
    "\n",
    "# 设置文件夹路径\n",
    "folder_path = 'D:/个人爱好/十/227-旅游可视化/travel_ana_dis_system/app/static/spider/data/sight'  # 请将这里的your_folder_path_here替换成你的CSV文件所在的文件夹路径\n",
    "\n",
    "# 获取文件夹中的所有文件\n",
    "files = os.listdir(folder_path)\n",
    "\n",
    "# 初始化一个空的DataFrame列表\n",
    "dataframes = []\n",
    "\n",
    "# 遍历文件列表，找到所有的CSV文件\n",
    "for file in files:\n",
    "    if file.endswith('.csv'):\n",
    "        # 拼接文件路径\n",
    "        file_path = os.path.join(folder_path, file)\n",
    "        # 读取CSV文件，并追加到DataFrame列表中\n",
    "        dataframes.append(pd.read_csv(file_path))\n",
    "\n",
    "# 最后使用concat函数将所有的DataFrame拼接成一个大的DataFrame\n",
    "combined_df = pd.concat(dataframes, ignore_index=True)\n",
    "\n",
    "# 输出最终的DataFrame\n",
    "print(combined_df.shape)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 55,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['poiId', 'businessId', 'poiName', 'commentCount', 'commentScore',\n",
       "       'districtId', 'districtName', 'sightLevelStr', 'coverImageUrl',\n",
       "       'distanceStr', 'tagNameList', 'otherTag', 'detailUrl', 'price',\n",
       "       'priceTypeDesc', 'isFree', 'openStatus', 'shortFeatures',\n",
       "       'sightCategoryInfo', 'latitude', 'longitude', 'heatScore'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 55,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data =combined_df\n",
    "data.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 56,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "count    6820.000000\n",
       "mean       52.859287\n",
       "std        85.089474\n",
       "min         0.000000\n",
       "25%         0.000000\n",
       "50%        30.000000\n",
       "75%        80.000000\n",
       "max      2780.000000\n",
       "Name: totalPrice1, dtype: float64"
      ]
     },
     "execution_count": 56,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "data['price'].value_counts()\n",
    "temp = []\n",
    "for i in data['price']:\n",
    "    if i=='free':\n",
    "        temp.append(0)\n",
    "    else:\n",
    "        temp.append(float(i))\n",
    "data['totalPrice1']=temp\n",
    "data['totalPrice1'].describe()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 57,
   "metadata": {},
   "outputs": [],
   "source": [
    "list_temp =[]\n",
    "for i in data['totalPrice1']:\n",
    "    if i <=5:\n",
    "        list_temp.append(\"低价\")\n",
    "    elif i >=5 and i<=50:\n",
    "        list_temp.append(\"高价\")\n",
    "    else :\n",
    "        list_temp.append(\"中价\")\n",
    "data['景点档次'] = list_temp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 58,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 58,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import folium #地图信息\n",
    "from folium.plugins import HeatMap\n",
    "import webbrowser #用于生成网页显示\n",
    "# 创建地图对象，设置中心点和缩放级别\n",
    "map = folium.Map(\n",
    "    # tiles=\"http://webrd02.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=7&x={x}&y={y}&z={z}\",  # 设置高德底图\n",
    "                   attr='default',location=[114.298569, 30.584354])\n",
    "# 根据小区档次设置不同的颜色\n",
    "colors = {'高价': 'red', '中价': 'blue', '低价': 'green'}\n",
    "# 遍历数据，添加标记\n",
    "for index, row in data.sample(500).iterrows():    \n",
    "    folium.Marker(location=[row['latitude'], row['longitude']],                  \n",
    "                  icon=folium.Icon(color=colors[row['景点档次']])).add_to(map)\n",
    "name = '分布1.html'\n",
    "map.save(name)  # 保存热力图文件\n",
    "# 将结果文件打开进行显示\n",
    "webbrowser.open(name, new=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 59,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 59,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# 获取需要的数据\n",
    "lng = data['latitude']\n",
    "lat = data['longitude']\n",
    "heat_data = [[row['latitude'],row['longitude'],row['totalPrice1']] for index, row in data.iterrows()]\n",
    " \n",
    "# 绘制地图\n",
    "m = folium.Map(location=[114.298569,30.584354],\n",
    "               zoom_start=11,\n",
    "            #    tiles='https://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=7',\n",
    "               attr='高德-常规图') # 初始化地图\n",
    " \n",
    "# 添加热力图层\n",
    "HeatMap(heat_data, name='热力图').add_to(m)\n",
    " \n",
    "# 保存地图\n",
    "m.save(r'分布2.html')\n",
    "webbrowser.open(r'分布2.html', new=2)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 60,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 60,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Chuandain latitude and longitude\n",
    "latitude =  30.584354 \n",
    "longitude = 114.298569\n",
    "\n",
    "# instantiate a feature group for the incidents in the dataframe\n",
    "incidents = folium.map.FeatureGroup()\n",
    "\n",
    "# read stations \n",
    "# cdata = pd.read_csv('StationInfo.csv')\n",
    "# for lat, lon,label  in zip(data.lat, data.lng, data.totalPrice1):\n",
    "#     incidents.add_child(\n",
    "#         folium.CircleMarker(\n",
    "#             [lat, lon],\n",
    "#             radius=7, \n",
    "#             color='yellow',\n",
    "#             fill=True,\n",
    "#             fill_color='red',\n",
    "#             fill_opacity=0.4,\n",
    "#             tooltip=label\n",
    "#         )\n",
    "#     )     \n",
    "# catalog heatmap\n",
    "heatdata =  data[['latitude','longitude','totalPrice1']].values.tolist()\n",
    "HeatMap(heatdata).add_to(incidents)\n",
    "\n",
    "\n",
    "# add a single earthquake\n",
    "incidents.add_child(folium.Marker([28.9, 103.3],icon=folium.Icon(color='red'), tooltip='M = 4.0'))\n",
    "\n",
    "# add area border\n",
    "# ls = folium.PolyLine(locations=[[22,98],[22,107],[34,107],[34,98],[22,98]],color='blue')\n",
    "# ls.add_to(incidents)\n",
    "\n",
    "# add incidents to map\n",
    "my_map = folium.Map(location=[latitude, longitude], zoom_start=6)\n",
    "my_map.add_child(incidents)\n",
    "\n",
    "# add latitude and longitude in the map when click\n",
    "my_map.add_child(folium.LatLngPopup())\n",
    "\n",
    "# save map\n",
    "my_map.save('分布3.html')\n",
    "webbrowser.open('分布3.html')\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 61,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "True"
      ]
     },
     "execution_count": 61,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "import folium\n",
    "import webbrowser\n",
    "\n",
    "# 获取需要的数据\n",
    "lng = data['longitude']\n",
    "lat = data['latitude']\n",
    "heat_data = [[row['latitude'], row['longitude'], row['totalPrice1']] for index, row in data.iterrows()]\n",
    "\n",
    "# 绘制地图\n",
    "m = folium.Map(location=[114.298569, 30.584354],\n",
    "               zoom_start=11,\n",
    "               tiles='https://wprd01.is.autonavi.com/appmaptile?x={x}&y={y}&z={z}&lang=zh_cn&size=1&scl=1&style=7',\n",
    "               attr='高德-常规图') # 初始化地图\n",
    "\n",
    "# 添加热力图层\n",
    "HeatMap(heat_data, name='热力图').add_to(m)\n",
    "\n",
    "# 添加卫星图层\n",
    "folium.TileLayer(\n",
    "    tiles='https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png',\n",
    "    attr='OpenStreetMap',\n",
    "    name='OpenStreetMap',\n",
    "    max_zoom=20,\n",
    "    subdomains=['a', 'b', 'c'],\n",
    "    overlay=False,\n",
    "    control=True\n",
    ").add_to(m)\n",
    "\n",
    "# 保存地图\n",
    "m.save(r'分布4.html')\n",
    "webbrowser.open(r'分布4.html', new=2)\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "metadata": {},
   "outputs": [],
   "source": [
    "import pandas as pd\n",
    "df = pd.read_csv('D:/个人爱好/十/227-旅游可视化/travel_ana_dis_system/app/static/spider/data/ultimate_sight/ultimate_sight.csv', encoding='utf-8')\n",
    "df = df[df['sightLevelStr']=='5A']\n",
    "df = df.drop_duplicates(subset=['poiName', 'commentCount'])  "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "districtName\n",
       "北京     7\n",
       "西安     5\n",
       "神农架    4\n",
       "重庆     4\n",
       "桂林     4\n",
       "      ..\n",
       "威海     1\n",
       "井冈山    1\n",
       "开化     1\n",
       "南昌     1\n",
       "雅安     1\n",
       "Name: count, Length: 255, dtype: int64"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df['districtName'].value_counts()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 16,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "price\n",
       "free     65\n",
       "80.0     16\n",
       "60.0     13\n",
       "70.0     11\n",
       "50.0     10\n",
       "         ..\n",
       "5.0       1\n",
       "18.0      1\n",
       "31.0      1\n",
       "69.0      1\n",
       "249.0     1\n",
       "Name: count, Length: 91, dtype: int64"
      ]
     },
     "execution_count": 16,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "temp=[]\n",
    "for i in df['price']:\n",
    "    if i=='free':\n",
    "        temp.append(0)\n",
    "    else:\n",
    "        temp.append(float(i))\n",
    "df['price']=temp"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>poiId</th>\n",
       "      <th>businessId</th>\n",
       "      <th>poiName</th>\n",
       "      <th>commentCount</th>\n",
       "      <th>commentScore</th>\n",
       "      <th>districtId</th>\n",
       "      <th>districtName</th>\n",
       "      <th>sightLevelStr</th>\n",
       "      <th>coverImageUrl</th>\n",
       "      <th>distanceStr</th>\n",
       "      <th>...</th>\n",
       "      <th>detailUrl</th>\n",
       "      <th>price</th>\n",
       "      <th>priceTypeDesc</th>\n",
       "      <th>isFree</th>\n",
       "      <th>openStatus</th>\n",
       "      <th>shortFeatures</th>\n",
       "      <th>sightCategoryInfo</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>heatScore</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>2264</th>\n",
       "      <td>10558743</td>\n",
       "      <td>16583</td>\n",
       "      <td>夫子庙秦淮风光带</td>\n",
       "      <td>4572</td>\n",
       "      <td>4.7</td>\n",
       "      <td>9</td>\n",
       "      <td>南京</td>\n",
       "      <td>5A</td>\n",
       "      <td>https://youimg1.c-ctrip.com/target/100g1f00000...</td>\n",
       "      <td>距滁州54.4km</td>\n",
       "      <td>...</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/9/0...</td>\n",
       "      <td>free</td>\n",
       "      <td>免费</td>\n",
       "      <td>True</td>\n",
       "      <td>08:30开园</td>\n",
       "      <td>['乘船游秦淮河赏美景']</td>\n",
       "      <td>南京夜景榜 No.1</td>\n",
       "      <td>32.026208</td>\n",
       "      <td>118.795961</td>\n",
       "      <td>7.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4874</th>\n",
       "      <td>75697</td>\n",
       "      <td>1655</td>\n",
       "      <td>中山陵景区</td>\n",
       "      <td>0</td>\n",
       "      <td>0.0</td>\n",
       "      <td>9</td>\n",
       "      <td>南京</td>\n",
       "      <td>5A</td>\n",
       "      <td>https://youimg1.c-ctrip.com/target/100h1100000...</td>\n",
       "      <td>距仪征39.4km</td>\n",
       "      <td>...</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/9/0...</td>\n",
       "      <td>free</td>\n",
       "      <td>免费预约</td>\n",
       "      <td>True</td>\n",
       "      <td>NaN</td>\n",
       "      <td>['孙中山先生的陵墓']</td>\n",
       "      <td>南京赏花踏青地 No.2</td>\n",
       "      <td>32.060275</td>\n",
       "      <td>118.861040</td>\n",
       "      <td>7.7</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>2 rows × 22 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "         poiId  businessId   poiName  commentCount  commentScore  districtId  \\\n",
       "2264  10558743       16583  夫子庙秦淮风光带          4572           4.7           9   \n",
       "4874     75697        1655     中山陵景区             0           0.0           9   \n",
       "\n",
       "     districtName sightLevelStr  \\\n",
       "2264           南京            5A   \n",
       "4874           南京            5A   \n",
       "\n",
       "                                          coverImageUrl distanceStr  ...  \\\n",
       "2264  https://youimg1.c-ctrip.com/target/100g1f00000...   距滁州54.4km  ...   \n",
       "4874  https://youimg1.c-ctrip.com/target/100h1100000...   距仪征39.4km  ...   \n",
       "\n",
       "                                              detailUrl price priceTypeDesc  \\\n",
       "2264  https://m.ctrip.com/webapp/you/gspoi/sight/9/0...  free            免费   \n",
       "4874  https://m.ctrip.com/webapp/you/gspoi/sight/9/0...  free          免费预约   \n",
       "\n",
       "     isFree openStatus  shortFeatures sightCategoryInfo   latitude  \\\n",
       "2264   True    08:30开园  ['乘船游秦淮河赏美景']        南京夜景榜 No.1  32.026208   \n",
       "4874   True        NaN   ['孙中山先生的陵墓']      南京赏花踏青地 No.2  32.060275   \n",
       "\n",
       "       longitude  heatScore  \n",
       "2264  118.795961        7.9  \n",
       "4874  118.861040        7.7  \n",
       "\n",
       "[2 rows x 22 columns]"
      ]
     },
     "execution_count": 13,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[df['districtName']=='南京']"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 14,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "Index(['poiId', 'businessId', 'poiName', 'commentCount', 'commentScore',\n",
       "       'districtId', 'districtName', 'sightLevelStr', 'coverImageUrl',\n",
       "       'distanceStr', 'tagNameList', 'otherTag', 'detailUrl', 'price',\n",
       "       'priceTypeDesc', 'isFree', 'openStatus', 'shortFeatures',\n",
       "       'sightCategoryInfo', 'latitude', 'longitude', 'heatScore'],\n",
       "      dtype='object')"
      ]
     },
     "execution_count": 14,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df.columns"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 15,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>tagNameList</th>\n",
       "      <th>otherTag</th>\n",
       "      <th>detailUrl</th>\n",
       "      <th>price</th>\n",
       "      <th>priceTypeDesc</th>\n",
       "      <th>isFree</th>\n",
       "      <th>openStatus</th>\n",
       "      <th>shortFeatures</th>\n",
       "      <th>sightCategoryInfo</th>\n",
       "      <th>latitude</th>\n",
       "      <th>longitude</th>\n",
       "      <th>heatScore</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>['亲近大自然', '游山玩水']</td>\n",
       "      <td>随时退</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/100...</td>\n",
       "      <td>90.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>08:00开园</td>\n",
       "      <td>['险峻的丹霞地貌']</td>\n",
       "      <td>衢州3大山水景点 No.1</td>\n",
       "      <td>28.537984</td>\n",
       "      <td>118.574766</td>\n",
       "      <td>7.0</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>['体验慢生活', '古镇古村']</td>\n",
       "      <td>需提前预约</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/100...</td>\n",
       "      <td>65.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>08:00开园</td>\n",
       "      <td>['融合三省的建筑风格']</td>\n",
       "      <td>衢州4大亲子乐园景点 No.1</td>\n",
       "      <td>28.297396</td>\n",
       "      <td>118.489174</td>\n",
       "      <td>6.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>['赏花胜地', '游山玩水']</td>\n",
       "      <td>随买随用</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/101...</td>\n",
       "      <td>120.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>['道教名山']</td>\n",
       "      <td>2022年度赏花踏青景点</td>\n",
       "      <td>28.900927</td>\n",
       "      <td>118.072059</td>\n",
       "      <td>8.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>11</th>\n",
       "      <td>['嗨玩乐园', '影视基地']</td>\n",
       "      <td>随买随用</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/608...</td>\n",
       "      <td>310.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>['穿越时空的旅行']</td>\n",
       "      <td>2022年度亲子乐园景点</td>\n",
       "      <td>29.143630</td>\n",
       "      <td>120.323374</td>\n",
       "      <td>8.3</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>20</th>\n",
       "      <td>['游山玩水', '文化古迹']</td>\n",
       "      <td>随买随用</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/100...</td>\n",
       "      <td>55.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>['绝壁上的飞瀑']</td>\n",
       "      <td>NaN</td>\n",
       "      <td>27.847381</td>\n",
       "      <td>120.028528</td>\n",
       "      <td>6.1</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>...</th>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "      <td>...</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6240</th>\n",
       "      <td>['文化古迹']</td>\n",
       "      <td>NaN</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/246...</td>\n",
       "      <td>free</td>\n",
       "      <td>免费</td>\n",
       "      <td>True</td>\n",
       "      <td>08:40开园</td>\n",
       "      <td>['高句丽王朝遗迹洞沟古墓群']</td>\n",
       "      <td>NaN</td>\n",
       "      <td>41.173462</td>\n",
       "      <td>126.168622</td>\n",
       "      <td>5.4</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6250</th>\n",
       "      <td>['亲近大自然', '踏青必去']</td>\n",
       "      <td>可订明日</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/243...</td>\n",
       "      <td>50.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>['世界佛教自然文化大公园']</td>\n",
       "      <td>NaN</td>\n",
       "      <td>27.704041</td>\n",
       "      <td>117.150124</td>\n",
       "      <td>6.2</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6360</th>\n",
       "      <td>['亲近大自然', '游山玩水']</td>\n",
       "      <td>宁夏消费券</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/210...</td>\n",
       "      <td>free</td>\n",
       "      <td>NaN</td>\n",
       "      <td>False</td>\n",
       "      <td>09:00开园</td>\n",
       "      <td>['江南水乡与大漠风光']</td>\n",
       "      <td>NaN</td>\n",
       "      <td>38.807523</td>\n",
       "      <td>106.368212</td>\n",
       "      <td>6.8</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6482</th>\n",
       "      <td>['游山玩水']</td>\n",
       "      <td>随买随用</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/275...</td>\n",
       "      <td>95.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>NaN</td>\n",
       "      <td>['都市人休闲放松的好去处']</td>\n",
       "      <td>NaN</td>\n",
       "      <td>33.360253</td>\n",
       "      <td>110.573171</td>\n",
       "      <td>5.9</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>6590</th>\n",
       "      <td>['亲近大自然', '游山玩水']</td>\n",
       "      <td>随买随用</td>\n",
       "      <td>https://m.ctrip.com/webapp/you/gspoi/sight/917...</td>\n",
       "      <td>85.0</td>\n",
       "      <td>门票</td>\n",
       "      <td>False</td>\n",
       "      <td>08:30开园</td>\n",
       "      <td>['观赏憨态可掬的大熊猫']</td>\n",
       "      <td>NaN</td>\n",
       "      <td>30.078399</td>\n",
       "      <td>102.997094</td>\n",
       "      <td>6.9</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>326 rows × 12 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "            tagNameList otherTag  \\\n",
       "0     ['亲近大自然', '游山玩水']      随时退   \n",
       "1     ['体验慢生活', '古镇古村']    需提前预约   \n",
       "2      ['赏花胜地', '游山玩水']     随买随用   \n",
       "11     ['嗨玩乐园', '影视基地']     随买随用   \n",
       "20     ['游山玩水', '文化古迹']     随买随用   \n",
       "...                 ...      ...   \n",
       "6240           ['文化古迹']      NaN   \n",
       "6250  ['亲近大自然', '踏青必去']     可订明日   \n",
       "6360  ['亲近大自然', '游山玩水']    宁夏消费券   \n",
       "6482           ['游山玩水']     随买随用   \n",
       "6590  ['亲近大自然', '游山玩水']     随买随用   \n",
       "\n",
       "                                              detailUrl  price priceTypeDesc  \\\n",
       "0     https://m.ctrip.com/webapp/you/gspoi/sight/100...   90.0            门票   \n",
       "1     https://m.ctrip.com/webapp/you/gspoi/sight/100...   65.0            门票   \n",
       "2     https://m.ctrip.com/webapp/you/gspoi/sight/101...  120.0            门票   \n",
       "11    https://m.ctrip.com/webapp/you/gspoi/sight/608...  310.0            门票   \n",
       "20    https://m.ctrip.com/webapp/you/gspoi/sight/100...   55.0            门票   \n",
       "...                                                 ...    ...           ...   \n",
       "6240  https://m.ctrip.com/webapp/you/gspoi/sight/246...   free            免费   \n",
       "6250  https://m.ctrip.com/webapp/you/gspoi/sight/243...   50.0            门票   \n",
       "6360  https://m.ctrip.com/webapp/you/gspoi/sight/210...   free           NaN   \n",
       "6482  https://m.ctrip.com/webapp/you/gspoi/sight/275...   95.0            门票   \n",
       "6590  https://m.ctrip.com/webapp/you/gspoi/sight/917...   85.0            门票   \n",
       "\n",
       "      isFree openStatus     shortFeatures sightCategoryInfo   latitude  \\\n",
       "0      False    08:00开园       ['险峻的丹霞地貌']     衢州3大山水景点 No.1  28.537984   \n",
       "1      False    08:00开园     ['融合三省的建筑风格']   衢州4大亲子乐园景点 No.1  28.297396   \n",
       "2      False        NaN          ['道教名山']      2022年度赏花踏青景点  28.900927   \n",
       "11     False        NaN       ['穿越时空的旅行']      2022年度亲子乐园景点  29.143630   \n",
       "20     False        NaN        ['绝壁上的飞瀑']               NaN  27.847381   \n",
       "...      ...        ...               ...               ...        ...   \n",
       "6240    True    08:40开园  ['高句丽王朝遗迹洞沟古墓群']               NaN  41.173462   \n",
       "6250   False        NaN   ['世界佛教自然文化大公园']               NaN  27.704041   \n",
       "6360   False    09:00开园     ['江南水乡与大漠风光']               NaN  38.807523   \n",
       "6482   False        NaN   ['都市人休闲放松的好去处']               NaN  33.360253   \n",
       "6590   False    08:30开园    ['观赏憨态可掬的大熊猫']               NaN  30.078399   \n",
       "\n",
       "       longitude  heatScore  \n",
       "0     118.574766        7.0  \n",
       "1     118.489174        6.8  \n",
       "2     118.072059        8.4  \n",
       "11    120.323374        8.3  \n",
       "20    120.028528        6.1  \n",
       "...          ...        ...  \n",
       "6240  126.168622        5.4  \n",
       "6250  117.150124        6.2  \n",
       "6360  106.368212        6.8  \n",
       "6482  110.573171        5.9  \n",
       "6590  102.997094        6.9  \n",
       "\n",
       "[326 rows x 12 columns]"
      ]
     },
     "execution_count": 15,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df[['tagNameList', 'otherTag', 'detailUrl', 'price',\n",
    "       'priceTypeDesc', 'isFree', 'openStatus', 'shortFeatures',\n",
    "       'sightCategoryInfo', 'latitude', 'longitude', 'heatScore']]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 19,
   "metadata": {},
   "outputs": [],
   "source": [
    "a=df['poiName'].tolist()\n",
    "b=df['latitude'].tolist()\n",
    "c=df['longitude'].tolist()\n",
    "dictt={}\n",
    "for i in range(len(b)):\n",
    "    dictt[a[i]] = [c[i],b[i]]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 20,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'江郎山风景名胜区': [118.574766, 28.537984],\n",
       " '廿八都古镇': [118.489174, 28.297396],\n",
       " '三清山风景区': [118.072059, 28.900927],\n",
       " '横店影视城': [120.323374, 29.14363],\n",
       " '刘伯温故里百丈漈景区': [120.028528, 27.847381],\n",
       " '太姥山': [120.191584, 27.11601],\n",
       " '仙都景区': [120.147137, 28.696227],\n",
       " '呀诺达雨林文化旅游区': [109.654937, 18.458283],\n",
       " '槟榔谷': [109.671344, 18.40578],\n",
       " '蜈支洲岛': [109.734033, 18.280072],\n",
       " '扎什伦布寺': [88.878516, 29.270828],\n",
       " '喀纳斯景区': [87.138318, 48.513425],\n",
       " '西湖': [120.12792, 30.228932],\n",
       " '西溪国家湿地公园': [120.071528, 30.27289],\n",
       " '少林寺': [112.947824, 34.512991],\n",
       " '嵩山风景名胜区': [113.024128, 34.514355],\n",
       " '龙门石窟': [112.484071, 34.564375],\n",
       " '天柱山': [116.466349, 30.727213],\n",
       " '武当山风景区': [111.069878, 32.467392],\n",
       " '西塘风景区': [120.899827, 30.950489],\n",
       " '乌镇': [120.498288, 30.754286],\n",
       " '周庄': [120.857425, 31.121635],\n",
       " '南浔古镇': [120.436819, 30.881523],\n",
       " '南湖景区': [120.76508, 30.75747],\n",
       " '同里古镇': [120.729369, 31.160868],\n",
       " '沙家浜风景区': [120.800568, 31.555016],\n",
       " '拙政园': [120.63571, 31.330247],\n",
       " '尚湖风景区': [120.692021, 31.649097],\n",
       " '鼋头渚': [120.233409, 31.529792],\n",
       " '虞山景区': [120.711686, 31.677132],\n",
       " '虎丘山风景名胜区': [120.587391, 31.341612],\n",
       " '溪口风景区': [121.223511, 29.667818],\n",
       " '天一阁博物院': [121.546045, 29.87735],\n",
       " '神仙居': [120.60955, 28.694582],\n",
       " '雁荡山': [121.040296, 28.379665],\n",
       " '瘦西湖': [119.428044, 32.41475],\n",
       " '金山': [119.420865, 32.221528],\n",
       " '句容茅山景区': [119.322028, 31.791451],\n",
       " '北固山': [119.463941, 32.222362],\n",
       " '峨眉山': [103.356304, 29.573827],\n",
       " '乐山大佛': [103.78144, 29.547541],\n",
       " '都江堰景区': [103.617464, 31.006892],\n",
       " '青城山': [103.569195, 30.911742],\n",
       " '普达措国家公园': [99.951034, 27.864876],\n",
       " '灵山胜境': [120.107323, 31.432102],\n",
       " '赤壁古战场': [113.637088, 29.885145],\n",
       " '西柏坡景区': [113.950648, 38.345935],\n",
       " '连州地下河': [112.336485, 25.008057],\n",
       " '三坊七巷': [119.302962, 26.088549],\n",
       " '瑞金共和国摇篮景区': [116.018889, 25.889956],\n",
       " '那拉提旅游风景区': [84.032821, 43.325552],\n",
       " '喀拉峻草原': [82.050496, 43.100476],\n",
       " '橘子洲': [112.968631, 28.19271],\n",
       " '炎帝陵': [113.678907, 26.428599],\n",
       " '岳麓山': [112.943867, 28.189122],\n",
       " '乌鲁木齐天山大峡谷': [87.448268, 43.499343],\n",
       " '天山天池': [88.135599, 43.887072],\n",
       " '沙坡头': [105.008511, 37.483395],\n",
       " '崂山': [120.625651, 36.19066],\n",
       " '龙虎山风景区': [116.987638, 28.12352],\n",
       " '龟峰风景名胜区': [117.430979, 28.321817],\n",
       " '镇北堡西部影城': [106.078672, 38.621146],\n",
       " '额济纳胡杨林旅游区': [101.089966, 41.967599],\n",
       " '留园': [120.598973, 31.321729],\n",
       " '互助土族故土园景区': [101.943484, 36.839881],\n",
       " '塔尔寺': [101.575439, 36.493247],\n",
       " '青海湖': [100.235152, 36.90012],\n",
       " '阿咪东索景区': [100.327255, 38.105218],\n",
       " '武隆天生三桥': [107.811703, 29.439361],\n",
       " '武隆喀斯特旅游区': [107.809706, 29.435139],\n",
       " '仙女山国家森林公园': [107.745381, 29.503326],\n",
       " '芙蓉洞': [107.916276, 29.225564],\n",
       " '盘山': [117.289284, 40.104179],\n",
       " '清东陵': [117.690611, 40.180993],\n",
       " '故宫博物院': [116.403414, 39.924091],\n",
       " '黄山风景区': [118.168067, 30.130009],\n",
       " '宏村景区': [117.997052, 30.009334],\n",
       " '西递': [118.002521, 29.909235],\n",
       " '古徽州文化旅游区': [118.442534, 29.869137],\n",
       " '阿尔山国家森林公园': [120.346281, 47.208699],\n",
       " '巴松措': [93.974339, 30.014093],\n",
       " '雅鲁藏布大峡谷': [94.944433, 29.619023],\n",
       " '壶口瀑布': [110.455432, 36.151095],\n",
       " '张掖七彩丹霞旅游景区': [100.075745, 38.960823],\n",
       " '喀什老城': [75.999681, 39.483271],\n",
       " '趵突泉景区': [117.022393, 36.667359],\n",
       " '天下第一泉风景区': [117.021874, 36.667143],\n",
       " '泰山风景区': [117.094738, 36.269893],\n",
       " '曲阜三孔': [116.997078, 35.60282],\n",
       " '山海关': [119.767357, 40.01641],\n",
       " '石林风景区': [103.329722, 24.818203],\n",
       " '避暑山庄': [117.939336, 41.001685],\n",
       " '金山岭长城': [117.252133, 40.692653],\n",
       " '微山湖旅游区': [117.282873, 34.689638],\n",
       " '溱湖国家湿地公园': [120.108476, 32.627322],\n",
       " '濠河风景名胜区': [120.873478, 32.02037],\n",
       " '六鼎山文化旅游区': [128.251211, 43.329783],\n",
       " '安仁古镇': [103.626007, 30.513598],\n",
       " '鳄鱼山景区': [109.108756, 21.015509],\n",
       " '韶山': [112.49678, 27.910503],\n",
       " '象鼻山景区': [110.303088, 25.274388],\n",
       " '两江四湖': [110.301008, 25.274106],\n",
       " '独秀峰王城景区': [110.305642, 25.28786],\n",
       " '五台山': [113.595708, 38.976198],\n",
       " '白洋淀风景区': [115.996445, 38.942194],\n",
       " '黄鹤楼': [114.309043, 30.550317],\n",
       " '东湖': [114.420005, 30.557869],\n",
       " '神农架风景区': [110.345247, 31.434348],\n",
       " '神农顶风景区': [110.268941, 31.469289],\n",
       " '大九湖国家湿地公园': [110.017371, 31.484909],\n",
       " '官门山': [110.387546, 31.442716],\n",
       " '官鹅沟': [104.399088, 34.016524],\n",
       " '千岛湖景区': [119.060105, 29.552987],\n",
       " '分界洲岛': [110.206473, 18.582164],\n",
       " '太阳岛风景区': [126.604412, 45.797776],\n",
       " '清源山': [118.617557, 24.948554],\n",
       " '鼓浪屿': [118.074046, 24.451669],\n",
       " '白云山': [111.861401, 33.681146],\n",
       " '淹城春秋乐园': [119.939462, 31.707319],\n",
       " '东方明珠': [121.50635, 31.245417],\n",
       " '上海科技馆': [121.547781, 31.224611],\n",
       " '古文化街': [117.199147, 39.149755],\n",
       " '惠山古镇': [120.280694, 31.587894],\n",
       " '龙口南山旅游景区': [120.486149, 37.567466],\n",
       " '蓬莱阁': [120.761852, 37.830433],\n",
       " '八仙过海景区': [120.782399, 37.831054],\n",
       " '三仙山风景区': [120.790409, 37.827612],\n",
       " '东江湖风景区': [113.270441, 25.940517],\n",
       " '清明上河园': [114.346781, 34.814868],\n",
       " '青秀山': [108.395988, 22.794909],\n",
       " '刘公岛': [122.147512, 37.500214],\n",
       " '井冈山': [114.143478, 26.636407],\n",
       " '根宫佛国文化旅游区': [118.399521, 29.139382],\n",
       " '滕王阁': [115.887675, 28.687376],\n",
       " '赤水丹霞': [105.701966, 28.456772],\n",
       " '南山竹海': [119.531021, 31.175145],\n",
       " '镇远古城': [108.42516, 27.055783],\n",
       " '庐山西海主景区（原柘林湖司马码头）': [115.480011, 29.20165],\n",
       " '庐山风景名胜区': [116.002118, 29.56429],\n",
       " '三河古镇': [117.251323, 31.517873],\n",
       " '太行大峡谷景区': [113.755318, 36.182462],\n",
       " '红旗渠': [113.821625, 36.236268],\n",
       " '太行山大峡谷八泉峡景区': [113.574101, 35.950855],\n",
       " '殷墟': [114.332122, 36.128501],\n",
       " '鲁迅故里景区': [120.590772, 29.998872],\n",
       " '沈园': [120.596728, 29.996689],\n",
       " '老君山景区': [111.663, 33.75186],\n",
       " '鸡冠洞': [111.577781, 33.789687],\n",
       " '老界岭旅游度假区': [111.776313, 33.630889],\n",
       " '天台山风景区': [121.041933, 29.162903],\n",
       " '台州府城文化旅游区': [121.12379, 28.85245],\n",
       " '八达岭长城': [116.024067, 40.362639],\n",
       " '颐和园': [116.280234, 40.008817],\n",
       " '恭王府': [116.392599, 39.943381],\n",
       " '天坛': [116.419289, 39.889918],\n",
       " '岳阳楼': [113.100937, 29.385042],\n",
       " '地下大峡谷': [118.546815, 35.734372],\n",
       " '萤火虫水洞': [118.457716, 35.714287],\n",
       " '沂蒙山旅游区沂山景区': [118.717228, 36.209067],\n",
       " '沂蒙山云蒙景区（蒙山国家森林公园）': [117.973204, 35.564235],\n",
       " '海螺沟': [102.0196, 29.592001],\n",
       " '天目湖山水园': [119.441618, 31.318721],\n",
       " '天目湖': [119.452358, 31.324453],\n",
       " '天目湖御水温泉': [119.539678, 31.188264],\n",
       " '长鹿旅游休博园': [113.294091, 22.883131],\n",
       " '泗洪洪泽湖湿地': [118.33869, 33.252181],\n",
       " '天下第一关': [119.767232, 40.016497],\n",
       " '大连海昌发现王国主题公园': [122.010158, 39.087552],\n",
       " '金石滩度假区': [122.00072, 39.101588],\n",
       " '老虎滩海洋公园': [121.682201, 38.878145],\n",
       " '广东罗浮山风景名胜区': [114.04283, 23.270566],\n",
       " '惠州西湖': [114.404632, 23.095671],\n",
       " '中科院西双版纳热带植物园': [101.262951, 21.931604],\n",
       " '崇圣寺三塔文化旅游区': [100.149865, 25.710067],\n",
       " '伪满皇宫博物院': [125.355267, 43.911488],\n",
       " '净月潭': [125.459869, 43.806913],\n",
       " '长影世纪城': [125.452836, 43.778241],\n",
       " '长春世界雕塑园': [125.333277, 43.828839],\n",
       " '普者黑景区': [104.138015, 24.123947],\n",
       " '腾冲热海风景区': [98.447122, 24.952621],\n",
       " '丽江古城': [100.24195, 26.876527],\n",
       " '玉龙雪山': [100.210479, 27.140138],\n",
       " '丹霞山': [113.727658, 25.027559],\n",
       " '镜泊湖风景区': [128.961325, 44.07037],\n",
       " '白水洋风景区': [119.05858, 27.070499],\n",
       " '鸳鸯溪': [119.09236, 27.075703],\n",
       " '天堂寨': [115.78404, 31.144227],\n",
       " '云台山风景名胜区': [113.382019, 35.461608],\n",
       " '八里沟景区': [113.569986, 35.603373],\n",
       " '西峡恐龙遗迹园': [111.692948, 33.236235],\n",
       " '青州古城': [118.48551, 36.689227],\n",
       " '尧山风景区': [112.30794, 33.735198],\n",
       " '中原大佛景区': [112.465103, 33.775708],\n",
       " '夫子庙秦淮风光带': [118.795961, 32.026208],\n",
       " '千山': [123.13633, 41.015362],\n",
       " '武夷山': [117.962772, 27.658701],\n",
       " '云龙湖旅游景区': [117.160373, 34.243274],\n",
       " '荔波樟江风景名胜区': [107.753791, 25.256027],\n",
       " '花果山': [119.280983, 34.647226],\n",
       " '宁夏水洞沟旅游区': [106.519801, 38.297764],\n",
       " '天门山国家森林公园': [110.490324, 29.118089],\n",
       " '武陵源': [110.474719, 29.358432],\n",
       " '古窑民俗博览区': [117.191492, 29.289457],\n",
       " '江布拉克': [89.732482, 43.654161],\n",
       " '巴音布鲁克草原': [84.140746, 43.033796],\n",
       " '博斯腾湖': [86.731618, 41.842626],\n",
       " '野三坡': [115.392181, 39.674064],\n",
       " '白石山世界地质公园': [114.709195, 39.222931],\n",
       " '九寨沟风景区': [103.92111, 33.163509],\n",
       " '黄龙风景名胜区': [103.841761, 32.745214],\n",
       " '万佛湖风景区': [116.783857, 31.309521],\n",
       " '九华山': [117.830394, 30.48504],\n",
       " '龙川风景区': [118.676654, 30.083162],\n",
       " '五大连池风景区': [126.169173, 48.699297],\n",
       " '福建土楼(南靖)景区': [117.069189, 24.590349],\n",
       " '永定土楼': [116.981453, 24.657901],\n",
       " '泰宁风景旅游区': [117.108376, 26.869943],\n",
       " '湄洲岛': [119.13514, 25.069511],\n",
       " '清江画廊': [111.146701, 30.469601],\n",
       " '三峡人家': [111.162357, 30.796553],\n",
       " '三峡大坝旅游区': [111.04057, 30.832745],\n",
       " '屈原故里': [110.995065, 30.832078],\n",
       " '星湖旅游景区': [112.475998, 23.060851],\n",
       " '西樵山风景名胜区': [112.98374, 22.930239],\n",
       " '云冈石窟': [113.144291, 40.119273],\n",
       " '太白山国家森林公园': [107.827461, 34.070664],\n",
       " '法门寺文化景区': [107.908098, 34.440606],\n",
       " '光雾山': [106.80716, 32.694812],\n",
       " '衡山风景名胜区': [112.722065, 27.275666],\n",
       " '西安城墙': [108.954666, 34.257907],\n",
       " '大唐芙蓉园': [108.981465, 34.219076],\n",
       " '鸣沙山月牙泉': [94.68519, 40.095057],\n",
       " '嘉峪关关城': [98.227953, 39.805568],\n",
       " '麦积山风景名胜区': [106.015432, 34.357188],\n",
       " '君山岛': [113.013257, 29.358288],\n",
       " '漓江风景名胜区': [110.461136, 24.998464],\n",
       " '阿斯哈图石林景区': [117.527195, 43.9411],\n",
       " '柴河森林公园': [120.693622, 47.479538],\n",
       " '平遥古城': [112.190136, 37.209731],\n",
       " '绵山景区': [111.999227, 36.895317],\n",
       " '上海野生动物园': [121.727995, 31.06138],\n",
       " '洪洞大槐树寻根祭祖园': [111.682357, 36.277074],\n",
       " '叠彩山': [110.307513, 25.296195],\n",
       " '黄姚古镇': [111.213437, 24.25396],\n",
       " '三峡大瀑布': [111.329073, 30.930942],\n",
       " '黄河壶口瀑布风景名胜区': [110.45897, 36.153305],\n",
       " '云丘山景区': [111.025592, 35.755528],\n",
       " '满洲里国门景区': [117.360374, 49.635754],\n",
       " '布达拉宫': [91.125112, 29.660372],\n",
       " '大昭寺': [91.139556, 29.65596],\n",
       " '青岩古镇': [106.692799, 26.337877],\n",
       " '稻城亚丁': [100.293323, 28.464852],\n",
       " '响沙湾': [109.962922, 40.249915],\n",
       " '葡萄沟': [89.250414, 43.006873],\n",
       " '八里河旅游区': [116.313307, 32.564458],\n",
       " '开平碉楼文化旅游区': [112.586089, 22.377963],\n",
       " '闸坡大角湾': [111.853679, 21.575342],\n",
       " '北极村': [122.366127, 53.487363],\n",
       " '古隆中': [112.0419, 32.017677],\n",
       " '长白山景区': [128.091604, 42.059437],\n",
       " '桃花源': [111.448398, 28.796465],\n",
       " '黄帝陵': [109.277667, 35.591691],\n",
       " '延安革命纪念馆': [109.483932, 36.615001],\n",
       " '崆峒山': [106.504549, 35.556308],\n",
       " '可可托海景区': [89.890571, 47.228326],\n",
       " '白沙湖': [85.741271, 48.368136],\n",
       " '世界魔鬼城': [85.754111, 46.136384],\n",
       " '江湾景区': [118.058013, 29.374196],\n",
       " '鸡公山景区': [114.083925, 31.815094],\n",
       " '芜湖方特旅游区': [118.470192, 31.361888],\n",
       " '清西陵': [115.351206, 39.347288],\n",
       " '广府古城': [114.736704, 36.707337],\n",
       " '本溪水洞': [124.088388, 41.307548],\n",
       " '三百山景区': [115.431843, 25.004505],\n",
       " '华山': [110.073018, 34.497645],\n",
       " '秦始皇帝陵博物院(兵马俑)': [109.2851, 34.389417],\n",
       " '普陀山风景区': [122.397608, 30.007976],\n",
       " '恩施大峡谷': [109.173293, 30.43178],\n",
       " '腾龙洞风景区': [108.992579, 30.335537],\n",
       " '中华麋鹿园': [120.822622, 32.997093],\n",
       " '娲皇宫': [113.620752, 36.646383],\n",
       " '德夯大峡谷': [109.593699, 28.345107],\n",
       " '矮寨大桥': [109.608122, 28.335199],\n",
       " '矮寨奇观旅游区': [109.574087, 28.339202],\n",
       " '汤旺河石林风景区（汤旺河国家公园）': [129.461485, 48.466092],\n",
       " '采石矶': [118.463796, 31.661596],\n",
       " '沈阳世博园': [123.646004, 41.863456],\n",
       " '黄果树瀑布': [105.679151, 25.98579],\n",
       " '龙宫': [105.883979, 26.112743],\n",
       " '织金洞': [105.908472, 26.774341],\n",
       " '百里杜鹃风景区': [105.931775, 27.209884],\n",
       " '雁南飞茶田景区': [116.377712, 24.386083],\n",
       " '百色起义纪念园': [106.646229, 23.907725],\n",
       " '中山陵景区': [118.86104, 32.060275],\n",
       " '剑门关': [105.583728, 32.23016],\n",
       " '成吉思汗陵': [109.793505, 39.376626],\n",
       " '红海滩国家风景廊道': [121.851813, 40.908127],\n",
       " '黄河口生态旅游区': [118.99622, 37.76764],\n",
       " '南山文化旅游区': [109.213638, 18.304455],\n",
       " '大雁塔': [108.970602, 34.224579],\n",
       " '嵖岈山风景区': [113.736625, 33.135728],\n",
       " '台儿庄古城': [117.749556, 34.563811],\n",
       " '芒砀山': [116.51776, 34.17571],\n",
       " '神农山': [112.824656, 35.213809],\n",
       " '青天河': [113.016986, 35.34716],\n",
       " '皇城相府': [112.589525, 35.519938],\n",
       " '梵净山': [108.700762, 27.920153],\n",
       " '邓小平故里': [106.643279, 30.525267],\n",
       " '萍乡武功山风景区': [114.135962, 27.495399],\n",
       " '宜春明月山旅游区': [114.268405, 27.608242],\n",
       " '桂林乐满地主题乐园': [110.68427, 25.589709],\n",
       " '慕田峪长城': [116.575896, 40.440146],\n",
       " '明十三陵': [116.231846, 40.263544],\n",
       " '阆中古城': [105.978146, 31.580063],\n",
       " '雁门关': [112.889451, 39.189975],\n",
       " '华清宫': [109.222908, 34.363989],\n",
       " '炳灵寺世界文化遗产旅游区': [103.353496, 35.943359],\n",
       " '德天跨国瀑布景区': [106.734993, 22.858884],\n",
       " '崀山国家级风景区': [110.802193, 26.359977],\n",
       " '高句丽文物古迹旅游景区': [126.168622, 41.173462],\n",
       " '大觉山': [117.150124, 27.704041],\n",
       " '沙湖生态旅游区': [106.368212, 38.807523],\n",
       " '金丝峡景区': [110.573171, 33.360253],\n",
       " '碧峰峡': [102.997094, 30.078399]}"
      ]
     },
     "execution_count": 20,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "dictt"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "metadata": {},
   "outputs": [],
   "source": [
    "    import pandas as pd\n",
    "    df = pd.read_csv(\n",
    "        'D:/个人爱好/十/227-旅游可视化/travel_ana_dis_system/app/static/spider/data/ultimate_sight/ultimate_sight.csv',\n",
    "        encoding='utf-8')\n",
    "    df = df.drop_duplicates(subset=['poiName', 'commentCount'])\n",
    "    # df['total'] = df['heatScore'].astype(float)+df['commentScore'].astype(float)\n",
    "    # 按Age列升序排序\n",
    "    df_sorted = df.sort_values(by='commentCount',ascending=False)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>poiName</th>\n",
       "      <th>commentCount</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>1161</th>\n",
       "      <td>上海迪士尼度假区</td>\n",
       "      <td>219294</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>488</th>\n",
       "      <td>故宫博物院</td>\n",
       "      <td>136156</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2721</th>\n",
       "      <td>东方明珠</td>\n",
       "      <td>134673</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1162</th>\n",
       "      <td>东方明珠</td>\n",
       "      <td>134672</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1164</th>\n",
       "      <td>外滩</td>\n",
       "      <td>132079</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3434</th>\n",
       "      <td>上海野生动物园</td>\n",
       "      <td>93661</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4305</th>\n",
       "      <td>秦始皇帝陵博物院(兵马俑)</td>\n",
       "      <td>85866</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>221</th>\n",
       "      <td>成都大熊猫繁育研究基地</td>\n",
       "      <td>62695</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1120</th>\n",
       "      <td>长隆野生动物世界</td>\n",
       "      <td>51293</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4671</th>\n",
       "      <td>右江民族博物馆</td>\n",
       "      <td>47842</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "</div>"
      ],
      "text/plain": [
       "            poiName  commentCount\n",
       "1161       上海迪士尼度假区        219294\n",
       "488           故宫博物院        136156\n",
       "2721           东方明珠        134673\n",
       "1162           东方明珠        134672\n",
       "1164             外滩        132079\n",
       "3434        上海野生动物园         93661\n",
       "4305  秦始皇帝陵博物院(兵马俑)         85866\n",
       "221     成都大熊猫繁育研究基地         62695\n",
       "1120       长隆野生动物世界         51293\n",
       "4671        右江民族博物馆         47842"
      ]
     },
     "execution_count": 6,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "df_sorted[['poiName','commentCount']][:10]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.11.7"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 4
}
